return button;
},
- _onClicked: function() {
+ activate: function() {
this.parent();
let app = Gio.app_info_get_default_for_type('inode/directory', false);
this._closedId = this._channel.connect('invalidated', Lang.bind(this, this._channelClosed));
this._notification = new ChatNotification(this);
- this._notification.connect('clicked', Lang.bind(this, this.open));
+ this._notification.connect('activated', Lang.bind(this, this.open));
this._notification.setUrgency(MessageTray.Urgency.HIGH);
this._notifyTimeoutId = 0;
this.actor = new St.Button({ accessible_role: Atk.Role.NOTIFICATION });
this.actor.add_style_class_name('notification-unexpanded');
this.actor._delegate = this;
- this.actor.connect('clicked', Lang.bind(this, this._onClicked));
+ this.actor.connect('clicked', Lang.bind(this, this.activate));
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
this._table = new St.Table({ style_class: 'notification',
this.actor.add_style_class_name('notification-unexpanded');
},
- _onClicked: function() {
- this.emit('clicked');
+ activate: function() {
+ this.emit('activated');
// We hide all types of notifications once the user clicks on them because the common
// outcome of clicking should be the relevant window being brought forward and the user's
// attention switching to the window.
this.add(source);
let notification = new Notification(source, ngettext("%d new message", "%d new messages", len).format(len));
notification.setTransient(true);
- notification.connect('clicked', Lang.bind(this, function() {
+ notification.connect('activated', Lang.bind(this, function() {
this.openTray();
}));
source.notify(notification);
}
if (hasDefaultAction) {
- notification.connect('clicked', Lang.bind(this, function() {
+ notification.connect('activated', Lang.bind(this, function() {
this._emitActionInvoked(ndata.id, 'default');
}));
} else {
- notification.connect('clicked', Lang.bind(this, function() {
+ notification.connect('activated', Lang.bind(this, function() {
source.open();
}));
}
this._activateAction(action.unpack(), actionTarget);
},
- _onClicked: function() {
+ activate: function() {
this._activateAction(this._defaultAction, this._defaultActionTarget);
this.parent();
},
let [title, banner] = this._getTitleAndBanner(app, window);
let notification = new MessageTray.Notification(source, title, banner);
- notification.connect('clicked', function() {
+ notification.connect('activated', function() {
source.open();
});
notification.setForFeedback(true);